//
//  UICollectionViewDataSourcePrefetching.swift
//  Documentation
//
//  Created by Toj on 11/18/22.
//

public protocol UICollectionViewDataSourcePrefetching : NSObjectProtocol {
    
    
    // indexPaths are ordered ascending by geometric distance from the collection view
    @available(iOS 10.0, *)
    func collectionView(_ collectionView: UICollectionView, prefetchItemsAt indexPaths: [IndexPath])
    
    
    // indexPaths that previously were considered as candidates for pre-fetching, but were not actually used; may be a subset of the previous call to -collectionView:prefetchItemsAtIndexPaths:
    @available(iOS 10.0, *)
    optional func collectionView(_ collectionView: UICollectionView, cancelPrefetchingForItemsAt indexPaths: [IndexPath])
}
